package com.ourteam.product.requirement.api;

import com.ourteam.frame.web.AbstractSearchModel;
import com.ourteam.product.requirement.dao.ProductTeamDAOQueryBean;
import com.ourteam.product.requirement.domain.ProductTeamBean;

public class ProductTeamSearchModel extends AbstractSearchModel<ProductTeamDAOQueryBean> {

	private long productDefineId;
	
	@Override
	public String getMappedDAOField(String aProperty) {
		return ProductTeamBean.getMappedDAOField(aProperty);
	}

	@Override
	protected void doBuildQueryBean(ProductTeamDAOQueryBean queryBean) throws Exception {
		
		ProductTeamDAOQueryBean.Criteria criteria = queryBean.createCriteria();
		
		if(this.productDefineId != 0) {
			criteria.andProductDefineIdEqualTo(productDefineId);
		}
	}

	public long getProductDefineId() {
		return productDefineId;
	}

	public void setProductDefineId(long productDefineId) {
		this.productDefineId = productDefineId;
	}

}
